package net.heri.xmppchat.activities.chatroom;

import roboguice.event.Observes;
import android.os.Handler;
import android.os.Message;

public class ChatRoomController {
	
	private Handler mHandler;
	
	public void setHandler(Handler handler){
		mHandler = handler;
	}
	
	/**
	 *
	 */
	public void onSendMessage(@Observes IChatRoomEvent.OnSendMessage event) {
		Message msg = Message.obtain();
		msg.what = IChatRoomConstant.HandlerType.DISPLAY_TO_LIST;
		msg.obj = event.getData();
		mHandler.sendMessage(msg);
	}
}
